package com.lsx.logisticscore.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;

import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.Date;


/**
 * @author liang
 */
@Data
public class Ticket implements Serializable {
    @TableId(type = IdType.AUTO)
    private Integer ticketId;

    private Integer prodId;

    private Integer prodSum;

    private String target;

    private String source;

    private Date createTime;

    private String status;

    private static final long serialVersionUID = 1L;

    public String getCreateTime(){
        if(this.createTime != null){
            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH-mm-ss");
            return sdf.format(this.createTime);
        }
        return null;
    }

    public Integer getTicketId() {
        return ticketId;
    }

    public void setTicketId(Integer ticketId) {
        this.ticketId = ticketId;
    }

    public Integer getProdId() {
        return prodId;
    }

    public void setProdId(Integer prodId) {
        this.prodId = prodId;
    }

    public Integer getProdSum() {
        return prodSum;
    }

    public void setProdSum(Integer prodSum) {
        this.prodSum = prodSum;
    }

    public String getTarget() {
        return target;
    }

    public void setTarget(String target) {
        this.target = target;
    }

    public String getSource() {
        return source;
    }

    public void setSource(String source) {
        this.source = source;
    }
}
